]> andersk Git - moira.git/blobdiff - reg_svr/requests.c
dereference NULL bug
[moira.git] / reg_svr / requests.c
index ddf8afc0c0f4a91b4d069bbef9f5f4e6920f011c..98ec328980aea86799b642423394cee3735945ad 100644 (file)
@@ -7,7 +7,7 @@
  *     For copying and distribution information, please see the file
  *     <mit-copyright.h>.
  *
- *      Server for user registration with SMS and Kerberos.
+ *      Server for user registration with Moira and Kerberos.
  *
  *      This file handles the processing of requests for the register
  *      server.
@@ -34,8 +34,8 @@ static char *rcsid_requests_c = "$Header$";
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <netdb.h>
-#include "sms.h"
-#include "sms_app.h"
+#include "moira.h"
+#include "moira_site.h"
 #include "reg_svr.h"
 
 #define NUM_REQUESTS_SAVED 100 /* Number of transactions to save */
@@ -224,6 +224,7 @@ int format_pkt(packet, pktlenp, seqno, cl_status, message)
     /* Find out how much of the message to copy; truncate if too short. */
     /* How much room is there left? */
     len = *pktlenp - sizeof(U_32BIT)*3;
+    if (message == NULL) message = "";
     if (len < strlen(message) + 1) /* Room for null terminator */
     {
        status = FAILURE;       /* Message was truncated */
@@ -401,13 +402,8 @@ parse_pkt(packet, pktlen, message)
     return status;
 }
 
-/*
- * Local Variables:
- * mode: c
- * c-argdecl-indent: 2
- * c-brace-offset: -4
- * c-continued-statement-offset: 4
- * c-indent-level: 4
- * c-label-offset: -2
- * End:
- */
+
+u_long cur_req_sender()
+{
+    return (CUR_REQ.ip_address);
+}
This page took 0.036595 seconds and 4 git commands to generate.