There's a couple of things that leap out at me immediately.
Firstly was the pair of assignments inside an if statement that you've since fixed. Next thing I saw was this section of code:
while(iList!=SS1.end())
{
MACHINELIST* pList=*iList;
if((pList->Status=NO_CONNECTION)||(pList->Status=NOT_ACTIVE))
{
if((strcmp(pList->Make1,MAKE)==0)&&(strcmp(pList->Model1,MODEL)==0))
{
CConnector *p_CDiamax=new CConnector();
I'm assuming the last line is the one in which you make the connection and the object you'd like to use later in the send/recv loop. If thats's the case, I wonder two things - (1) wouldn't you need to save this to either (a) a temporary list at the same index as the machine it belongs to or (b) better yet, inside the machine pointed to by pList?
(2) Is that all there is to it - do you need to specify a port number and url now or do you do that in your loop later on?
Lastly, I see in the while(1) loop that you do two things - (1) connect to all of the machines (2) send/receive some data from them all. As it stands, that approach has a memory leak. Every time you run though the code I quoted, you're creating a
new connector for each machine. If you need a connector per machine, then just add the member to the MachineList struct, initialize it once each per machine. If, one the other-hand, you just use it as an intermediary - a tool to get a socket for send/recv, then create one on the stack outside the loop and extract the needed information from it for each machine each time through the loop. It's on the stack, so it will delete itself when the func ends. I really don't know - I'm not familiar with CConnector, also there appears to be code missing, as opposed to not producing the expected results. Really can't say further.