mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-11-04 05:15:22 +00:00 
			
		
		
		
	Merge "sorcery/realtime: Add a bit of debug and warning messages for bad configs"
This commit is contained in:
		@@ -2869,6 +2869,7 @@ int ast_realtime_is_mapping_defined(const char *family)
 | 
				
			|||||||
			return 1;
 | 
								return 1;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						ast_debug(5, "Failed to find a realtime mapping for %s\n", family);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -991,7 +991,11 @@ enum ast_sorcery_apply_result __ast_sorcery_insert_wizard_mapping(struct ast_sor
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						ast_debug(5, "Calling wizard %s open callback on object type %s\n",
 | 
				
			||||||
 | 
							name, object_type->name);
 | 
				
			||||||
	if (wizard->callbacks.open && !(object_wizard->data = wizard->callbacks.open(data))) {
 | 
						if (wizard->callbacks.open && !(object_wizard->data = wizard->callbacks.open(data))) {
 | 
				
			||||||
 | 
							ast_log(LOG_WARNING, "Wizard '%s' failed to open mapping for object type '%s' with data: %s\n",
 | 
				
			||||||
 | 
								name, object_type->name, S_OR(data, ""));
 | 
				
			||||||
		AST_VECTOR_RW_UNLOCK(&object_type->wizards);
 | 
							AST_VECTOR_RW_UNLOCK(&object_type->wizards);
 | 
				
			||||||
		return AST_SORCERY_APPLY_FAIL;
 | 
							return AST_SORCERY_APPLY_FAIL;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user