-
- Downloads
Add/user sbbs_t::getuseron() for better user.tab error logging/handling
Looking into potential causes of issue #843, I found several instances where we call getuserdat() without checking the return value and restoring the useron.number to the current user number upon error: getuserdat() zeroes out the user struct/number upon error, a bad API choice made 23 years ago. Replace those instances with calls to sbbs_t::getuseron() which logs any open/lock/read failures of the user.tab and does not modify/zero-out the sbbs_t::useron struct upon error.
Showing
- src/sbbs3/chat.cpp 1 addition, 2 deletionssrc/sbbs3/chat.cpp
- src/sbbs3/data.cpp 22 additions, 0 deletionssrc/sbbs3/data.cpp
- src/sbbs3/execfunc.cpp 1 addition, 1 deletionsrc/sbbs3/execfunc.cpp
- src/sbbs3/getnode.cpp 1 addition, 2 deletionssrc/sbbs3/getnode.cpp
- src/sbbs3/js_bbs.cpp 2 additions, 2 deletionssrc/sbbs3/js_bbs.cpp
- src/sbbs3/main.cpp 4 additions, 11 deletionssrc/sbbs3/main.cpp
- src/sbbs3/newuser.cpp 1 addition, 1 deletionsrc/sbbs3/newuser.cpp
- src/sbbs3/sbbs.h 1 addition, 0 deletionssrc/sbbs3/sbbs.h
Loading
Please register or sign in to comment