MCPcopy Index your code
hub / github.com/Hamlib/Hamlib / rig_debug

Function rig_debug

src/debug.c:205–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203 */
204#undef rig_debug
205void HAMLIB_API rig_debug(enum rig_debug_level_e debug_level,
206 const char *fmt, ...)
207{
208 static pthread_mutex_t client_debug_lock = PTHREAD_MUTEX_INITIALIZER;
209 va_list ap;
210
211 if (!rig_need_debug(debug_level))
212 {
213 return;
214 }
215
216 pthread_mutex_lock(&client_debug_lock);
217 va_start(ap, fmt);
218
219 if (rig_vprintf_cb)
220 {
221 rig_vprintf_cb(debug_level, rig_vprintf_arg, fmt, ap);
222 }
223 else
224 {
225 if (!rig_debug_stream)
226 {
227 rig_debug_stream = stderr;
228 }
229
230 if (rig_debug_time_stamp)
231 {
232 char buf[256];
233 fprintf(rig_debug_stream, "%s: ", date_strget(buf, sizeof(buf), 1));
234 }
235
236 vfprintf(rig_debug_stream, fmt, ap);
237 fflush(rig_debug_stream);
238 }
239
240 va_end(ap);
241#ifdef ANDROID
242 int a;
243 va_start(ap, fmt);
244
245 switch (debug_level)
246 {
247// case RIG_DEBUG_NONE:
248 case RIG_DEBUG_BUG:
249 a = ANDROID_LOG_FATAL;
250 break;
251
252 case RIG_DEBUG_ERR:
253 a = ANDROID_LOG_ERROR;
254 break;
255
256 case RIG_DEBUG_WARN:
257 a = ANDROID_LOG_WARN;
258 break;
259
260 case RIG_DEBUG_VERBOSE:
261 a = ANDROID_LOG_VERBOSE;
262 break;

Callers 15

tapr.cFile · 0.85
v4l_set_freqFunction · 0.85
v4l_get_freqFunction · 0.85
v4l_set_funcFunction · 0.85
v4l_get_funcFunction · 0.85
v4l_set_levelFunction · 0.85
v4l_get_levelFunction · 0.85
v4l_get_infoFunction · 0.85
v4l2_set_freqFunction · 0.85
v4l2_get_freqFunction · 0.85
v4l2_set_funcFunction · 0.85
v4l2_get_funcFunction · 0.85

Calls 4

rig_need_debugFunction · 0.85
pthread_mutex_lockFunction · 0.85
date_strgetFunction · 0.85
pthread_mutex_unlockFunction · 0.85

Tested by 3

rig_test_cwFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68