| | 1132 | | pvm_tc_conreq(mid) |
| | 1133 | | int mid; |
| | 1134 | | { |
| | 1135 | | int src; |
| | 1136 | | int sbf = 0; |
| | 1137 | | int ttpro; |
| | 1138 | | struct ttpcb *pcbp; |
| | 1139 | | int ackd; |
| | 1140 | | char *addr = ""; |
| | 1141 | | int i; |
| | 1142 | | int ictx; |
| | 1143 | | #ifdef SOCKLENISUINT |
| | 1144 | | #if defined(IMA_AIX4SP2) || defined(IMA_AIX5SP2) |
| | 1145 | | unsigned int oslen; |
| | 1146 | | #else |
| | 1147 | | size_t oslen; |
| | 1148 | | #endif |
| | 1149 | | #else |
| | 1150 | | int oslen; |
| | 1151 | | #endif |
| | 1152 | | #ifndef NOUNIXDOM |
| | 1153 | | struct sockaddr_un uns; |
| | 1154 | | char spath[PVMTMPNAMLEN];
|
| | 1155 | | #endif |
| | 1156 | | char buf[256]; |
| | 1157 | | |
| | 1158 | | pvm_bufinfo(mid, (int *)0, (int *)0, &src); |
| | 1159 | | |
| | 1160 | | pvm_upkint(&ttpro, 1, 1); |
| | 1161 | | pvm_upkstr(buf); |
| | 1162 | | |
| | 1163 | | if (pcbp = ttpcb_find(src)) { |
| | 1164 | | if (pvmdebmask & PDMROUTE) {
|
| | 1165 | | pvmlogprintf( |
| | 1166 | | "pvm_tc_conreq() crossed CONREQ from t%x\n", src); |
| | 1167 | | } |
| | 1168 | | if (pcbp->tt_state == TTCONWAIT) {
|
| | 1169 | | |
| | 1170 | | |
| | 1171 | | |
| | 1172 | | |
| | 1173 | | |
| | | | ... |
| | 1214 | | pvm_freebuf(pvm_setsbuf(sbf)); |
| | 1215 | | } |
| | 1216 | | } |
| | 1217 | | |
| | 1218 | | } else { |
| | 1219 | | pvmlogprintf( |
| | 1220 | | "pvm_tc_conreq() CONREQ from t%x but state=%d ?\n", |
| | 1221 | | src, pcbp->tt_state); |
| | 1222 | | } |
| | 1223 | | |
| | 1224 | | } else { |
| | 1225 | | if (pvmdebmask & PDMROUTE)
|
| | 1226 | | pvmlogprintf("pvm_tc_conreq() CONREQ from t%x\n", src); |
| | 1227 | | ackd = 1; |
| | 1228 | | pcbp = ttpcb_creat(src); |
| | 1229 | | if (pvmrouteopt != PvmDontRoute) {
|
| | 1230 | | if (buf[0] == '/') { |
| | 1231 | | |
| | 1232 | | #ifdef NOUNIXDOM |
| | 1233 | | |
| | 1234 | | pvmlogprintf( "%s CONREQ from t%x, ", |
| | 1235 | | "pvm_tc_conreq()", src ); |
| | 1236 | | pvmlogprintf( "Unix domain socket unsupported\n" ); |
| | 1237 | | |
| | 1238 | | #else |
| | 1239 | | |
| | 1240 | | if ((pcbp->tt_fd = socket(AF_UNIX, SOCK_STREAM, 0))
|
| | | | ... |
| | 1271 | | |
| | 1272 | | |
| | 1273 | | |
| | 1274 | | check_routeadd(pcbp); |
| | 1275 | | } |
| | 1276 | | } |
| | 1277 | | } |
| | 1278 | | |
| | 1279 | | #endif |
| | 1280 | | |
| | 1281 | | } else { |
| referenced by returned value | 1282 | | if ((pcbp->tt_fd = socket(AF_INET, SOCK_STREAM, 0)) | Problem | | referenced by returned value |
|
| referenced by pcbp->tt_fd | 1283 | | == -1) { |
| | 1284 | | pvmlogperror("pvm_tc_conreq() socket"); |
| | 1285 | | |
| | 1286 | | } else { |
| | 1287 | | pcbp->tt_sad = pvmourinet; |
| | 1288 | | oslen = sizeof(pcbp->tt_sad); |
| referenced by pcbp[-1].tt_spath | 1289 | | if (bind(pcbp->tt_fd, | Problem | | referenced by pcbp[-1].tt_spath |
|
| referenced by pcbp->tt_fd | 1290 | | (struct sockaddr*)&pcbp->tt_sad, oslen) |
| referenced by pcbp[-1].tt_spath | 1291 | | == -1) { | Problem | | referenced by pcbp[-1].tt_spath |
|
| | 1292 | | pvmlogperror("pvm_tc_conreq() bind"); |
| | 1293 | | |
| | 1294 | | } else { |
| | 1295 | | if (getsockname(pcbp->tt_fd, |
| | 1296 | | (struct sockaddr*)&pcbp->tt_sad, &oslen) |
| | 1297 | | == -1) { |