Added Debug Messages

origin
stpohle 23 years ago
parent 74221c7f99
commit 8f2c480d9b

@ -29,8 +29,8 @@ dnl Check for SDL
AC_MSG_ERROR(SDL not found. Make sure sdl-config is in your PATH, or specify with --with-sdl-prefix) AC_MSG_ERROR(SDL not found. Make sure sdl-config is in your PATH, or specify with --with-sdl-prefix)
) )
CFLAGS="$SDL_CFLAGS $CFLAGS" CFLAGS="$SDL_CFLAGS $CFLAGS -ggdb"
LIBS="$SDL_LIBS $LIBS" LIBS="$SDL_LIBS $LIBS -ggdb"
dnl Checks for header files. dnl Checks for header files.

@ -14,6 +14,7 @@ extern int debug_lastping;
static short int pkg_lastid; /* the packet id, this will only counted static short int pkg_lastid; /* the packet id, this will only counted
up nothing more.. if we are at 0x10000 up nothing more.. if we are at 0x10000
we will start at 0 */ we will start at 0 */
static signed char debug_lastpkgtyp = -1;
struct _resend_cache resend_cache; struct _resend_cache resend_cache;
struct _inpkg_index inpkg_index[PKG_IN_INDEX_NUM]; struct _inpkg_index inpkg_index[PKG_IN_INDEX_NUM];
@ -1077,6 +1078,11 @@ do_pkg (struct pkg *packet, _net_addr * addr)
if (GT_MP_PTPM) if (GT_MP_PTPM)
fwd_pkg (packet, addr); fwd_pkg (packet, addr);
if (debug_lastpkgtyp != packet->h.typ && debug) {
debug_lastpkgtyp = packet->h.typ;
printf ("NEW PKGTYP (%d)\n", debug_lastpkgtyp);
}
switch (packet->h.typ) { switch (packet->h.typ) {
case (PKG_error): case (PKG_error):
if (do_error ((struct pkg_error *) packet, addr) < 0) if (do_error ((struct pkg_error *) packet, addr) < 0)

Loading…
Cancel
Save