You realize that you are posting in a thread that is several years old? Just pure luck that I still had a 'notify me on new posts' flag still active on this...
Your code looks really strange; are you sure this is the code you compile? ,can there be some forum formatting error screwing it up?
Look here for example:
Code:
for(i=0; i<2> 0)
FD_SET(fd[!i], &obits);
else
FD_SET(fd[i], &ibits);
FD_SET(fd[i], &ebits);
}
Else what? Else-for? Does this even compile? Is this still supposed to be c?
Code:
for(i=0; i<2> 0 */{
printf("got something from #%d '%s' \n",fd[i],buf[i]);
bp[i] = buf[i];
}
}
A dangling end-of-comment? What has happened with this code? Please look through this again...
Another question:
Is there any other apps read from /dev/mux2 ? And If So, they won't get anything from /dev/mux2.
Not that I really remember any of this from two years back... and showing my limited knowledge of hardware driver design: Wouldn't it be messy to design your hardware gsm modem interface so that you have more than one daemon interacting with it on the same socket? My guess would be that it is the role of tapisrv, and tapisrv alone to open this socket. But I may very well be proven wrong.
So, why are you re-woking this thread? Are you trying to re-do a SMS spam filter without the limitations with mudassars approach?