Remove unused code (and pstring).
authorJeremy Allison <jra@samba.org>
Wed, 28 Nov 2007 22:08:49 +0000 (14:08 -0800)
committerJeremy Allison <jra@samba.org>
Wed, 28 Nov 2007 22:08:49 +0000 (14:08 -0800)
Jeremy.
(This used to be commit a261a61226248b41be22dd4f2873b5ed82bc2a24)

source3/libsmb/clidgram.c

index 5b619b645804fb423284dcaaa5c7576040b1e8a6..82f874f383ae8d5ad2c82af921c3ffca540e0f26 100644 (file)
@@ -113,95 +113,3 @@ bool cli_send_mailslot(struct messaging_context *msg_ctx,
                                                  MSG_SEND_PACKET,
                                                  (uint8 *)&p, sizeof(p)));
 }
-
-/*
- * cli_get_response: Get a response ...
- */
-bool cli_get_response(const char *mailslot, char *buf, int bufsiz)
-{
-       struct packet_struct *p;
-
-       p = receive_unexpected(DGRAM_PACKET, 0, mailslot);
-
-       if (p == NULL)
-               return False;
-
-       memcpy(buf, &p->packet.dgram.data[92],
-              MIN(bufsiz, p->packet.dgram.datasize-92));
-
-       return True;
-}
-
-/*
- * cli_get_backup_list: Send a get backup list request ...
- */
-
-static char cli_backup_list[1024];
-
-int cli_get_backup_list(struct messaging_context *msg_ctx,
-                       const char *myname, const char *send_to_name)
-{
-       pstring outbuf;
-       char *p;
-       struct sockaddr_storage sendto_ss;
-
-       if (!resolve_name(send_to_name, &sendto_ss, 0x1d)) {
-
-               DEBUG(0, ("Could not resolve name: %s<1D>\n", send_to_name));
-               return False;
-
-       }
-
-       memset(cli_backup_list, '\0', sizeof(cli_backup_list));
-       memset(outbuf, '\0', sizeof(outbuf));
-
-       p = outbuf;
-
-       SCVAL(p, 0, ANN_GetBackupListReq);
-       p++;
-
-       SCVAL(p, 0, 1); /* Count pointer ... */
-       p++;
-
-       SIVAL(p, 0, 1); /* The sender's token ... */
-       p += 4;
-
-       cli_send_mailslot(msg_ctx, True, "\\MAILSLOT\\BROWSE", 1, outbuf, 
-                         PTR_DIFF(p, outbuf), myname, 0, send_to_name, 
-                         0x1d, &sendto_ss);
-
-       /* We should check the error and return if we got one */
-
-       /* Now, get the response ... */
-
-       cli_get_response("\\MAILSLOT\\BROWSE",
-                        cli_backup_list, sizeof(cli_backup_list));
-
-       return True;
-
-}
-
-/*
- * cli_get_backup_server: Get the backup list and retrieve a server from it
- */
-
-int cli_get_backup_server(struct messaging_context *msg_ctx,
-                         char *my_name, char *target, char *servername,
-                         int namesize)
-{
-
-  /* Get the backup list first. We could pull this from the cache later */
-
-  cli_get_backup_list(msg_ctx, my_name, target);  /* FIXME: Check the response */
-
-  if (!cli_backup_list[0]) { /* Empty list ... try again */
-
-    cli_get_backup_list(msg_ctx, my_name, target);
-
-  }
-
-  strncpy(servername, cli_backup_list, MIN(16, namesize));
-
-  return True;
-
-}