summaryrefslogtreecommitdiff
path: root/lib/ZRecvNot.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ZRecvNot.c')
-rw-r--r--lib/ZRecvNot.c29
1 files changed, 4 insertions, 25 deletions
diff --git a/lib/ZRecvNot.c b/lib/ZRecvNot.c
index bfed17a..27cba29 100644
--- a/lib/ZRecvNot.c
+++ b/lib/ZRecvNot.c
@@ -22,9 +22,8 @@ Code_t ZReceiveNotice(notice, from)
{
char *buffer;
struct _Z_InputQ *nextq;
- int len, auth, i, j;
+ int len, auth;
Code_t retval;
- struct sockaddr_in sin;
if ((retval = Z_WaitForComplete()) != ZERR_NONE)
return (retval);
@@ -36,11 +35,9 @@ Code_t ZReceiveNotice(notice, from)
if (!(buffer = (char *) malloc((unsigned) len)))
return (ENOMEM);
- if (!from)
- from = &sin;
-
- *from = nextq->from;
-
+ if (from)
+ *from = nextq->from;
+
(void) memcpy(buffer, nextq->packet, len);
auth = nextq->auth;
@@ -49,23 +46,5 @@ Code_t ZReceiveNotice(notice, from)
if ((retval = ZParseNotice(buffer, len, notice)) != ZERR_NONE)
return (retval);
notice->z_checked_auth = auth;
-
- notice->z_dest_galaxy = "unknown-galaxy";
-
- if (__ngalaxies == 1) {
- /* assume everything is in the same galaxy */
-
- notice->z_dest_galaxy = __galaxy_list[0].galaxy_config.galaxy;
- } else {
- for (i=0; i<__ngalaxies; i++)
- for (j=0; j<__galaxy_list[i].galaxy_config.nservers; j++)
- if (from->sin_addr.s_addr ==
- __galaxy_list[i].galaxy_config.server_list[j].addr.s_addr) {
- notice->z_dest_galaxy =
- __galaxy_list[i].galaxy_config.galaxy;
- break;
- }
- }
-
return ZERR_NONE;
}