Deleted Added
full compact
table.c (90261) table.c (112998)
1/*
2 * Copyright (c) 1983, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 22 unchanged lines hidden (view full) ---

31 * SUCH DAMAGE.
32 */
33
34#ifndef lint
35#if 0
36static char sccsid[] = "@(#)table.c 8.1 (Berkeley) 6/4/93";
37#endif
38static const char rcsid[] =
1/*
2 * Copyright (c) 1983, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 22 unchanged lines hidden (view full) ---

31 * SUCH DAMAGE.
32 */
33
34#ifndef lint
35#if 0
36static char sccsid[] = "@(#)table.c 8.1 (Berkeley) 6/4/93";
37#endif
38static const char rcsid[] =
39 "$FreeBSD: head/libexec/talkd/table.c 90261 2002-02-05 21:06:56Z imp $";
39 "$FreeBSD: head/libexec/talkd/table.c 112998 2003-04-03 05:13:27Z jmallett $";
40#endif /* not lint */
41
42/*
43 * Routines to handle insertion, deletion, etc on the table
44 * of requests kept by the daemon. Nothing fancy here, linear
45 * search on a double-linked list. A time is kept with each
46 * entry so that overly old invitations can be eliminated.
47 *
48 * Consider this a mis-guided attempt at modularity
49 */
50#include <sys/param.h>
51#include <sys/time.h>
52#include <sys/socket.h>
40#endif /* not lint */
41
42/*
43 * Routines to handle insertion, deletion, etc on the table
44 * of requests kept by the daemon. Nothing fancy here, linear
45 * search on a double-linked list. A time is kept with each
46 * entry so that overly old invitations can be eliminated.
47 *
48 * Consider this a mis-guided attempt at modularity
49 */
50#include <sys/param.h>
51#include <sys/time.h>
52#include <sys/socket.h>
53#include <netinet/in.h>
53#include <protocols/talkd.h>
54#include <stdio.h>
55#include <stdlib.h>
56#include <string.h>
57#include <syslog.h>
58#include <unistd.h>
59
60#include "extern.h"

--- 132 unchanged lines hidden (view full) ---

193 current_id = 1;
194 return (current_id);
195}
196
197/*
198 * Delete the invitation with id 'id_num'
199 */
200int
54#include <protocols/talkd.h>
55#include <stdio.h>
56#include <stdlib.h>
57#include <string.h>
58#include <syslog.h>
59#include <unistd.h>
60
61#include "extern.h"

--- 132 unchanged lines hidden (view full) ---

194 current_id = 1;
195 return (current_id);
196}
197
198/*
199 * Delete the invitation with id 'id_num'
200 */
201int
201delete_invite(int id_num)
202delete_invite(u_int32_t id_num)
202{
203 TABLE_ENTRY *ptr;
204
205 ptr = table;
206 if (debug)
207 syslog(LOG_DEBUG, "delete_invite(%d)", id_num);
208 for (ptr = table; ptr != NIL; ptr = ptr->next) {
209 if (ptr->request.id_num == id_num)

--- 28 unchanged lines hidden ---
203{
204 TABLE_ENTRY *ptr;
205
206 ptr = table;
207 if (debug)
208 syslog(LOG_DEBUG, "delete_invite(%d)", id_num);
209 for (ptr = table; ptr != NIL; ptr = ptr->next) {
210 if (ptr->request.id_num == id_num)

--- 28 unchanged lines hidden ---