- fp = fopen(filename, "r");
- if (fp == NULL) {
- end_critical_section(S_NETCONFIGS);
- return(-1);
- }
- while (fgets(buf, sizeof buf, fp) != NULL) {
- buf[strlen(buf)-1] = 0;
- extract_token(sc_type, buf, 0, '|', sizeof sc_type);
- extract_token(sc_node, buf, 1, '|', sizeof sc_node);
- extract_token(sc_room, buf, 2, '|', sizeof sc_room);
- if ( (!strcasecmp(sc_type, "ignet_push_share"))
- && (!strcasecmp(sc_node, target_node)) ) {
- found_node = 1;
-
- /* Concise syntax because we don't need a full linked-list */
- memset(&sc, 0, sizeof(SpoolControl));
- sc.ignet_push_shares = (maplist *)
- malloc(sizeof(maplist));
- sc.ignet_push_shares->next = NULL;
- safestrncpy(sc.ignet_push_shares->remote_nodename,
- sc_node,
- sizeof sc.ignet_push_shares->remote_nodename);
- safestrncpy(sc.ignet_push_shares->remote_roomname,
- sc_room,
- sizeof sc.ignet_push_shares->remote_roomname);
- }
+ pRNCFG = CtdlGetNetCfgForRoom(CCC->room.QRnumber);
+ if ((pRNCFG == NULL) ||
+ (pRNCFG->NetConfigs[ignet_push_share] == NULL))
+ {
+ return -1;
+ }
+
+ pCfgLine = pRNCFG->NetConfigs[ignet_push_share];
+ while (pCfgLine != NULL)
+ {
+ if (!strcmp(ChrPtr(pCfgLine->Value[0]), target_node))
+ break;
+ pCfgLine = pCfgLine->next;